<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: gpio.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">gpio.h</div>  </div>
</div>
<div class="contents">
<a href="gpio_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*This file has been prepared for Doxygen automatic documentation generation.*/</span>
<a name="l00015"></a>00015 <span class="comment">/* Copyright (c) 2010 - 2011 Atmel Corporation. All rights reserved.</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00018"></a>00018 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * 1. Redistributions of source code must retain the above copyright notice, this</span>
<a name="l00021"></a>00021 <span class="comment"> * list of conditions and the following disclaimer.</span>
<a name="l00022"></a>00022 <span class="comment"> *</span>
<a name="l00023"></a>00023 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span>
<a name="l00024"></a>00024 <span class="comment"> * this list of conditions and the following disclaimer in the documentation</span>
<a name="l00025"></a>00025 <span class="comment"> * and/or other materials provided with the distribution.</span>
<a name="l00026"></a>00026 <span class="comment"> *</span>
<a name="l00027"></a>00027 <span class="comment"> * 3. The name of Atmel may not be used to endorse or promote products derived</span>
<a name="l00028"></a>00028 <span class="comment"> * from this software without specific prior written permission.</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
<a name="l00030"></a>00030 <span class="comment"> * 4. This software may only be redistributed and used in connection with an Atmel</span>
<a name="l00031"></a>00031 <span class="comment"> * AVR product.</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY ATMEL &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED</span>
<a name="l00034"></a>00034 <span class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span>
<a name="l00035"></a>00035 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE</span>
<a name="l00036"></a>00036 <span class="comment"> * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR</span>
<a name="l00037"></a>00037 <span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00038"></a>00038 <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00039"></a>00039 <span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00040"></a>00040 <span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00041"></a>00041 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00042"></a>00042 <span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE</span>
<a name="l00043"></a>00043 <span class="comment"> *</span>
<a name="l00044"></a>00044 <span class="comment"> */</span>
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 <span class="preprocessor">#ifndef _GPIO_H_</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define _GPIO_H_</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="preprocessor">#include &lt;avr32/io.h&gt;</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &quot;<a class="code" href="compiler_8h.html" title="Compiler file for AVR32.">compiler.h</a>&quot;</span>
<a name="l00051"></a>00051 
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="gpio_8h.html#a27f04dbcec307382213c2179b50890c2">00055</a> <span class="preprocessor">#define GPIO_SUCCESS            0 //!&lt; Function successfully completed.</span>
<a name="l00056"></a><a class="code" href="gpio_8h.html#a13cb25f6da54f68dccb38c06eb872b3e">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_INVALID_ARGUMENT   1 //!&lt; Input parameters are out of range.</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span>
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 
<a name="l00062"></a>00062 
<a name="l00063"></a><a class="code" href="gpio_8h.html#a37dccdf4c8d04cae2be9a8ac321cad84">00063</a> <span class="preprocessor">#define GPIO_PIN_CHANGE         0 //!&lt; Interrupt triggered upon pin change.</span>
<a name="l00064"></a><a class="code" href="gpio_8h.html#ab7f1524655feb8ef492ffa61e8325ead">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_RISING_EDGE        1 //!&lt; Interrupt triggered upon rising edge.</span>
<a name="l00065"></a><a class="code" href="gpio_8h.html#ae3f7c69a67f3780f8c6361df8418a36b">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_FALLING_EDGE       2 //!&lt; Interrupt triggered upon falling edge.</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span>
<a name="l00067"></a>00067 
<a name="l00070"></a>00070 
<a name="l00071"></a><a class="code" href="gpio_8h.html#a4956087e24b3fc0ccf1f667b74cb967f">00071</a> <span class="preprocessor">#define GPIO_DIR_INPUT  (0 &lt;&lt; 0) //!&lt; Pin is Input</span>
<a name="l00072"></a><a class="code" href="gpio_8h.html#ae9bb804807d0819629660c6e97934e37">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_DIR_OUTPUT (1 &lt;&lt; 0) //!&lt; Pin is Output</span>
<a name="l00073"></a><a class="code" href="gpio_8h.html#a9cd8f65b90ba30e34601a72723783656">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_INIT_LOW   (0 &lt;&lt; 1) //!&lt; Initial Ouptput State is Low</span>
<a name="l00074"></a><a class="code" href="gpio_8h.html#a9e4e6646b825b19128db21e092c2e44a">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_INIT_HIGH  (1 &lt;&lt; 1) //!&lt; Initial Ouptput State is High</span>
<a name="l00075"></a><a class="code" href="gpio_8h.html#aaa7921da231fd2b96575fa522e2c1970">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_PULL_UP    (1 &lt;&lt; 2) //!&lt; Pull-Up (when input)</span>
<a name="l00076"></a><a class="code" href="gpio_8h.html#adec1802e074f3021d464da09cd66c7cf">00076</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_PULL_DOWN  (2 &lt;&lt; 2) //!&lt; Pull-Down (when input)</span>
<a name="l00077"></a><a class="code" href="gpio_8h.html#a6f4f2b5c9310f505aaf5cc5a02d2600d">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_BUSKEEPER  (3 &lt;&lt; 2) //!&lt; Bus Keeper</span>
<a name="l00078"></a><a class="code" href="gpio_8h.html#ab16a0393f2450ed9491a95ef0ea288c1">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_DRIVE_MIN  (0 &lt;&lt; 4) //!&lt; Drive Min Configuration</span>
<a name="l00079"></a><a class="code" href="gpio_8h.html#a63e8b24d3ece9baf261cc35905738989">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_DRIVE_LOW  (1 &lt;&lt; 4) //!&lt; Drive Low Configuration</span>
<a name="l00080"></a><a class="code" href="gpio_8h.html#a22f9106ce09eac77280ca35388ca2ebd">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_DRIVE_HIGH (2 &lt;&lt; 4) //!&lt; Drive High Configuration</span>
<a name="l00081"></a><a class="code" href="gpio_8h.html#a3afeaf0a455417d06fc6e82fa391fd7a">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_DRIVE_MAX  (3 &lt;&lt; 4) //!&lt; Drive Max Configuration</span>
<a name="l00082"></a><a class="code" href="gpio_8h.html#a72b7ac5b3613d972b88268bee9068e35">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_OPEN_DRAIN (1 &lt;&lt; 6) //!&lt; Open-Drain (when output)</span>
<a name="l00083"></a><a class="code" href="gpio_8h.html#aadf030a44a1d7ed6103eeb99b04e374d">00083</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_INTERRUPT  (1 &lt;&lt; 7) //!&lt; Enable Pin/Group Interrupt</span>
<a name="l00084"></a><a class="code" href="gpio_8h.html#afcb80da73f8a198a40b80fef39105fe1">00084</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_BOTHEDGES  (3 &lt;&lt; 7) //!&lt; Sense Both Edges</span>
<a name="l00085"></a><a class="code" href="gpio_8h.html#a6bd47e75cff940f229e23c5f9bcfa7c7">00085</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_RISING     (5 &lt;&lt; 7) //!&lt; Sense Risign Edge</span>
<a name="l00086"></a><a class="code" href="gpio_8h.html#ac9e681425ffee6043e319886303bc556">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define GPIO_FALLING    (7 &lt;&lt; 7) //!&lt; Sense Falling Edge</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span>
<a name="l00088"></a>00088 
<a name="l00090"></a><a class="code" href="structgpio__map__t.html">00090</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00091"></a>00091 {
<a name="l00092"></a><a class="code" href="structgpio__map__t.html#adcde0453f1866fc60d49fae253c1f61d">00092</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structgpio__map__t.html#adcde0453f1866fc60d49fae253c1f61d" title="Module pin.">pin</a>;              
<a name="l00093"></a><a class="code" href="structgpio__map__t.html#a8c496ffd37b778b552b3e7e66a6af367">00093</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <span class="keyword">function</span>;         
<a name="l00094"></a>00094 } <a class="code" href="structgpio__map__t.html" title="A type definition of pins and modules connectivity.">gpio_map_t</a>[];
<a name="l00095"></a>00095 
<a name="l00096"></a>00096 
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 
<a name="l00117"></a>00117 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#af8e9d12ce235497e93a945d244ffcb1d" title="Enables specific module modes for a set of pins.">gpio_enable_module</a>(<span class="keyword">const</span> <a class="code" href="structgpio__map__t.html" title="A type definition of pins and modules connectivity.">gpio_map_t</a> gpiomap, uint32_t size);
<a name="l00118"></a>00118 
<a name="l00134"></a>00134 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#af9f1a0613d0095efbcd451aea19aad61" title="Enables a specific module mode for a pin.">gpio_enable_module_pin</a>(uint32_t pin, uint32_t <span class="keyword">function</span>);
<a name="l00135"></a>00135 
<a name="l00141"></a>00141 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aac347caefb997c7286ece5afea7635e6" title="Enables the GPIO mode of a set of pins.">gpio_enable_gpio</a>(<span class="keyword">const</span> <a class="code" href="structgpio__map__t.html" title="A type definition of pins and modules connectivity.">gpio_map_t</a> gpiomap, uint32_t size);
<a name="l00142"></a>00142 
<a name="l00152"></a>00152 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a53c0551dec2802423245c507cdc93859" title="Enables the GPIO mode of a pin.">gpio_enable_gpio_pin</a>(uint32_t pin);
<a name="l00153"></a>00153 
<a name="l00154"></a>00154 <span class="comment">// The open-drain mode is not synthesized on the current AVR32 products.</span>
<a name="l00155"></a>00155 <span class="comment">// If one day some AVR32 products have this feature, the corresponding part</span>
<a name="l00156"></a>00156 <span class="comment">// numbers should be listed in the #if below.</span>
<a name="l00157"></a>00157 <span class="comment">// Note that other functions are available in this driver to use pins with open</span>
<a name="l00158"></a>00158 <span class="comment">// drain in GPIO mode. The advantage of the open-drain mode functions over these</span>
<a name="l00159"></a>00159 <span class="comment">// other functions is that they can be used not only in GPIO mode but also in</span>
<a name="l00160"></a>00160 <span class="comment">// module mode.</span>
<a name="l00161"></a>00161 <span class="preprocessor">#if 0</span>
<a name="l00162"></a>00162 <span class="preprocessor"></span>
<a name="l00167"></a>00167 <span class="keyword">extern</span> <span class="keywordtype">void</span> gpio_enable_pin_open_drain(uint32_t pin);
<a name="l00168"></a>00168 
<a name="l00173"></a>00173 <span class="keyword">extern</span> <span class="keywordtype">void</span> gpio_disable_pin_open_drain(uint32_t pin);
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 <span class="preprocessor">#endif</span>
<a name="l00176"></a>00176 <span class="preprocessor"></span>
<a name="l00181"></a>00181 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#ac7473fbcb50b12ed1f89e4af0053d9e3" title="Enables the pull-up resistor of a pin.">gpio_enable_pin_pull_up</a>(uint32_t pin);
<a name="l00182"></a>00182 
<a name="l00187"></a>00187 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a207ba37b5edca047bf822eb0d36bf5d1" title="Disables the pull-up resistor of a pin.">gpio_disable_pin_pull_up</a>(uint32_t pin);
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 <span class="preprocessor">#if defined(AVR32_GPIO_200_H_INCLUDED) || defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_212_H_INCLUDED)</span>
<a name="l00190"></a>00190 <span class="preprocessor"></span><span class="comment">// Added support of Pull-up Resistor, Pull-down Resistor and Buskeeper Control.</span>
<a name="l00191"></a>00191 
<a name="l00196"></a>00196 <span class="keyword">extern</span> <span class="keywordtype">void</span> gpio_enable_pin_pull_down(uint32_t pin);
<a name="l00197"></a>00197 
<a name="l00202"></a>00202 <span class="keyword">extern</span> <span class="keywordtype">void</span> gpio_disable_pin_pull_down(uint32_t pin);
<a name="l00203"></a>00203 
<a name="l00208"></a>00208 <span class="keyword">extern</span> <span class="keywordtype">void</span> gpio_enable_pin_buskeeper(uint32_t pin);
<a name="l00209"></a>00209 
<a name="l00214"></a>00214 <span class="keyword">extern</span> <span class="keywordtype">void</span> gpio_disable_pin_buskeeper(uint32_t pin);
<a name="l00215"></a>00215 
<a name="l00216"></a>00216 <span class="preprocessor">#endif</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span>
<a name="l00223"></a>00223 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aa1efc8ea580cc2ac1dd4f2b7694753a1" title="Configuration functionality on a pin.">gpio_configure_pin</a>(uint32_t pin, uint32_t flags);
<a name="l00224"></a>00224 
<a name="l00231"></a>00231 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#ad3316eb0275031a1bdb5cb984be8f447" title="Configuration functionality on a port.">gpio_configure_group</a>(uint32_t port, uint32_t mask, uint32_t flags);
<a name="l00232"></a>00232 
<a name="l00239"></a>00239 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#a595b3cc6efd0f39a7daf8adffdf8d722" title="Returns the value of a pin.">gpio_get_pin_value</a>(uint32_t pin);
<a name="l00240"></a>00240 
<a name="l00248"></a><a class="code" href="gpio_8h.html#a51dc36e43b63856c60359c5f9937df5d">00248</a> <span class="preprocessor"> #define gpio_pin_is_low(pin)\</span>
<a name="l00249"></a>00249 <span class="preprocessor">              (gpio_get_pin_value(pin)?0:1)</span>
<a name="l00250"></a>00250 <span class="preprocessor"></span>
<a name="l00258"></a><a class="code" href="gpio_8h.html#aca25f738722eeaa8430c14eed4e0c0d1">00258</a> <span class="preprocessor">#define gpio_pin_is_high(pin) \</span>
<a name="l00259"></a>00259 <span class="preprocessor">              (gpio_get_pin_value(pin)?1:0)</span>
<a name="l00260"></a>00260 <span class="preprocessor"></span>
<a name="l00270"></a>00270 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#ade998bc37c9a25de09e924d819196ba1" title="Returns the output value set for a GPIO pin.">gpio_get_gpio_pin_output_value</a>(uint32_t pin);
<a name="l00271"></a>00271 
<a name="l00282"></a>00282 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#a1c5870c1d41fc5452633f5d2dba400a8" title="Returns the output value set for a GPIO pin using open drain.">gpio_get_gpio_open_drain_pin_output_value</a>(uint32_t pin);
<a name="l00283"></a>00283 
<a name="l00288"></a>00288 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a4d51cd706a0f51f82298d2e532267ef5" title="Drives a GPIO pin to 1.">gpio_set_gpio_pin</a>(uint32_t pin);
<a name="l00289"></a>00289 
<a name="l00296"></a>00296 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a56f766236871cf0dbe917d9ead9b5fca" title="Drives a GPIO pin to 1.">gpio_set_pin_high</a>(uint32_t pin);
<a name="l00297"></a>00297 
<a name="l00298"></a>00298 
<a name="l00304"></a>00304 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a80f54b96c3056680069c59114c13c11c" title="Drives a GPIO port to 1.">gpio_set_group_high</a>(uint32_t port, uint32_t mask);
<a name="l00305"></a>00305 
<a name="l00310"></a>00310 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a556450a9b5877a6c3c02b9dac60595f9" title="Drives a GPIO pin to 0.">gpio_clr_gpio_pin</a>(uint32_t pin);
<a name="l00311"></a>00311 
<a name="l00318"></a>00318 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#ac691d66dd34e00bc7e990458fbd63cd8" title="Drives a GPIO pin to 0.">gpio_set_pin_low</a>(uint32_t pin);
<a name="l00319"></a>00319 
<a name="l00325"></a>00325 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a88a6f215862430f83fac55a7f2843df6" title="Drives a GPIO port to 0.">gpio_set_group_low</a>(uint32_t port, uint32_t mask);
<a name="l00326"></a>00326 
<a name="l00331"></a>00331 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a559c1966b17539fb6f2e6f88ceb52d0f" title="Toggles a GPIO pin.">gpio_tgl_gpio_pin</a>(uint32_t pin);
<a name="l00332"></a>00332 
<a name="l00339"></a>00339 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a821248aa6811112db9bf1ce9a67861bb" title="Toggles a GPIO pin.">gpio_toggle_pin</a>(uint32_t pin);
<a name="l00340"></a>00340 
<a name="l00346"></a>00346 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a592c014bb5a6f725d69d52ced0a2dd50" title="Toggles a GPIO group.">gpio_toggle_group</a>(uint32_t port, uint32_t mask);
<a name="l00347"></a>00347 
<a name="l00352"></a>00352 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aefb66382a63eb80fe2dbbba81941ea27" title="Drives a GPIO pin to 1 using open drain.">gpio_set_gpio_open_drain_pin</a>(uint32_t pin);
<a name="l00353"></a>00353 
<a name="l00358"></a>00358 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aa3ab2e7879fc80a4ac6a82de162a5b54" title="Drives a GPIO pin to 0 using open drain.">gpio_clr_gpio_open_drain_pin</a>(uint32_t pin);
<a name="l00359"></a>00359 
<a name="l00364"></a>00364 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#ae84d0b7369c3a00074129a0669eaa8c0" title="Toggles a GPIO pin using open drain.">gpio_tgl_gpio_open_drain_pin</a>(uint32_t pin);
<a name="l00365"></a>00365 
<a name="l00379"></a>00379 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aaff54a64c4d4be449dacdf7489843d86" title="Enables the glitch filter of a pin.">gpio_enable_pin_glitch_filter</a>(uint32_t pin);
<a name="l00380"></a>00380 
<a name="l00385"></a>00385 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#a52838ded649c70319ba0ead507ebc1b0" title="Disables the glitch filter of a pin.">gpio_disable_pin_glitch_filter</a>(uint32_t pin);
<a name="l00386"></a>00386 
<a name="l00395"></a>00395 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#a55a728589909501835f05b2ca33d43c8" title="Enables the interrupt of a pin with the specified settings.">gpio_enable_pin_interrupt</a>(uint32_t pin, uint32_t mode);
<a name="l00396"></a>00396 
<a name="l00401"></a>00401 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aba8e79a902d865538dcd88d5d3f9c964" title="Disables the interrupt of a pin.">gpio_disable_pin_interrupt</a>(uint32_t pin);
<a name="l00402"></a>00402 
<a name="l00409"></a>00409 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="gpio_8c.html#a45b567e9f64c3917c1584adb6f634d0a" title="Gets the interrupt flag of a pin.">gpio_get_pin_interrupt_flag</a>(uint32_t pin);
<a name="l00410"></a>00410 
<a name="l00415"></a>00415 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="gpio_8c.html#aff3dba73ea60af0aea6149bba1414aff" title="Clears the interrupt flag of a pin.">gpio_clear_pin_interrupt_flag</a>(uint32_t pin);
<a name="l00416"></a>00416 
<a name="l00418"></a>00418 
<a name="l00419"></a>00419 
<a name="l00420"></a>00420 <span class="preprocessor">#if (defined AVR32_GPIO_LOCAL_ADDRESS)</span>
<a name="l00421"></a>00421 <span class="preprocessor"></span>
<a name="l00435"></a>00435 
<a name="l00436"></a>00436 
<a name="l00442"></a>00442 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00443"></a>00443 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00444"></a>00444 <span class="preprocessor">#endif</span>
<a name="l00445"></a>00445 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_init(<span class="keywordtype">void</span>)
<a name="l00446"></a>00446 {
<a name="l00447"></a>00447   Set_system_register(AVR32_CPUCR,
<a name="l00448"></a>00448                       Get_system_register(AVR32_CPUCR) | AVR32_CPUCR_LOCEN_MASK);
<a name="l00449"></a>00449 }
<a name="l00450"></a>00450 
<a name="l00460"></a>00460 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00461"></a>00461 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00462"></a>00462 <span class="preprocessor">#endif</span>
<a name="l00463"></a>00463 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_enable_pin_output_driver(uint32_t pin)
<a name="l00464"></a>00464 {
<a name="l00465"></a>00465   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].oders = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00466"></a>00466 }
<a name="l00467"></a>00467 
<a name="l00474"></a>00474 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00475"></a>00475 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00476"></a>00476 <span class="preprocessor">#endif</span>
<a name="l00477"></a>00477 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_disable_pin_output_driver(uint32_t pin)
<a name="l00478"></a>00478 {
<a name="l00479"></a>00479   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].oderc = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00480"></a>00480 }
<a name="l00481"></a>00481 
<a name="l00490"></a>00490 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00491"></a>00491 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00492"></a>00492 <span class="preprocessor">#endif</span>
<a name="l00493"></a>00493 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> gpio_local_get_pin_value(uint32_t pin)
<a name="l00494"></a>00494 {
<a name="l00495"></a>00495   <span class="keywordflow">return</span> (AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].pvr &gt;&gt; (pin &amp; 0x1F)) &amp; 1;
<a name="l00496"></a>00496 }
<a name="l00497"></a>00497 
<a name="l00509"></a>00509 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00510"></a>00510 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00511"></a>00511 <span class="preprocessor">#endif</span>
<a name="l00512"></a>00512 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_set_gpio_pin(uint32_t pin)
<a name="l00513"></a>00513 {
<a name="l00514"></a>00514   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].ovrs = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00515"></a>00515 }
<a name="l00516"></a>00516 
<a name="l00528"></a>00528 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00529"></a>00529 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00530"></a>00530 <span class="preprocessor">#endif</span>
<a name="l00531"></a>00531 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_clr_gpio_pin(uint32_t pin)
<a name="l00532"></a>00532 {
<a name="l00533"></a>00533   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].ovrc = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00534"></a>00534 }
<a name="l00535"></a>00535 
<a name="l00547"></a>00547 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00548"></a>00548 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00549"></a>00549 <span class="preprocessor">#endif</span>
<a name="l00550"></a>00550 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_tgl_gpio_pin(uint32_t pin)
<a name="l00551"></a>00551 {
<a name="l00552"></a>00552   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].ovrt = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00553"></a>00553 }
<a name="l00554"></a>00554 
<a name="l00563"></a>00563 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00564"></a>00564 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00565"></a>00565 <span class="preprocessor">#endif</span>
<a name="l00566"></a>00566 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_init_gpio_open_drain_pin(uint32_t pin)
<a name="l00567"></a>00567 {
<a name="l00568"></a>00568   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].ovrc = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00569"></a>00569 }
<a name="l00570"></a>00570 
<a name="l00581"></a>00581 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00582"></a>00582 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00583"></a>00583 <span class="preprocessor">#endif</span>
<a name="l00584"></a>00584 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_set_gpio_open_drain_pin(uint32_t pin)
<a name="l00585"></a>00585 {
<a name="l00586"></a>00586   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].oderc = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00587"></a>00587 }
<a name="l00588"></a>00588 
<a name="l00599"></a>00599 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00600"></a>00600 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00601"></a>00601 <span class="preprocessor">#endif</span>
<a name="l00602"></a>00602 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_clr_gpio_open_drain_pin(uint32_t pin)
<a name="l00603"></a>00603 {
<a name="l00604"></a>00604   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].oders = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00605"></a>00605 }
<a name="l00606"></a>00606 
<a name="l00617"></a>00617 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00618"></a>00618 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00619"></a>00619 <span class="preprocessor">#endif</span>
<a name="l00620"></a>00620 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_local_tgl_gpio_open_drain_pin(uint32_t pin)
<a name="l00621"></a>00621 {
<a name="l00622"></a>00622   AVR32_GPIO_LOCAL.port[pin &gt;&gt; 5].odert = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00623"></a>00623 }
<a name="l00624"></a>00624 
<a name="l00626"></a>00626 <span class="preprocessor">#endif // AVR32_GPIO_LOCAL_ADDRESS</span>
<a name="l00627"></a>00627 <span class="preprocessor"></span>
<a name="l00628"></a>00628 <span class="preprocessor">#if UC3L</span>
<a name="l00629"></a>00629 <span class="preprocessor"></span>
<a name="l00630"></a>00630 
<a name="l00643"></a>00643 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00644"></a>00644 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00645"></a>00645 <span class="preprocessor">#endif</span>
<a name="l00646"></a>00646 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_enable_pin_periph_event(uint32_t pin)
<a name="l00647"></a>00647 {
<a name="l00648"></a>00648   AVR32_GPIO.port[pin &gt;&gt; 5].oderc = 1 &lt;&lt; (pin &amp; 0x1F); <span class="comment">// The GPIO output driver is disabled for that pin.</span>
<a name="l00649"></a>00649   AVR32_GPIO.port[pin &gt;&gt; 5].evers = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00650"></a>00650 }
<a name="l00651"></a>00651 
<a name="l00657"></a>00657 <span class="preprocessor">#if (defined __GNUC__)</span>
<a name="l00658"></a>00658 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00659"></a>00659 <span class="preprocessor">#endif</span>
<a name="l00660"></a>00660 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> gpio_disable_pin_periph_event(uint32_t pin)
<a name="l00661"></a>00661 {
<a name="l00662"></a>00662   AVR32_GPIO.port[pin &gt;&gt; 5].everc = 1 &lt;&lt; (pin &amp; 0x1F);
<a name="l00663"></a>00663 }
<a name="l00664"></a>00664 
<a name="l00674"></a>00674 <span class="keyword">extern</span> <span class="keywordtype">int</span> gpio_configure_pin_periph_event_mode(uint32_t pin, uint32_t mode, uint32_t use_igf);
<a name="l00675"></a>00675 
<a name="l00677"></a>00677 <span class="preprocessor">#endif</span>
<a name="l00678"></a>00678 <span class="preprocessor"></span>
<a name="l00679"></a>00679 
<a name="l00680"></a>00680 <span class="preprocessor">#endif  // _GPIO_H_</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:51 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
